<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<p>姓名：<%=request.getAttribute("myName")%></p>
<p>姓名：${requestScope.myName}</p>
<p>姓名：${myName}</p>

<p>年龄：<%=session.getAttribute("myAge")%></p>
<p>年龄：${sessionScope.myAge}</p>
<p>年龄：${myAge}</p>

<p>学校：<%=application.getAttribute("mySchool")%></p>
<p>学校：${applicationScope.mySchool}</p>
<%
    Cookie[] cookies = request.getCookies();
    String value = "";
    for (Cookie cookie : cookies) {
        if (cookie.getName().equals("myAddress")) {
            value = cookie.getValue();
        }
    }
%>
<p>地址：<%=value %></p>
<p>地址：${cookie.myAddress.value}</p>



</body>
</html>
